<script setup>
import { counterStore } from '@/stores/couterStore';
const counter = counterStore();
</script>

<template>
  <div>
    <h3>组件1</h3>
    <p>{{ counter.count }}</p>
    <button @click="counter.add">点击加1</button>
  </div>
</template>

<style scoped>

</style>
